package kusterordonio.interfaz;

import java.awt.event.KeyEvent;

public class VentanaPresionArterial extends javax.swing.JFrame {
    
    private boolean genero;

    /** Creates new form VentanaPresionArterial */
    public VentanaPresionArterial() {
        initComponents();
    }
    
    public VentanaPresionArterial(boolean unGenero) {
        genero = unGenero;
        initComponents();
        controlGenero();
        jBtnSalir.setMnemonic(KeyEvent.VK_S);
    }

    @SuppressWarnings("unchecked")
    
    public void controlGenero(){
        if (!genero){
            jLabelTitulo.setForeground(new java.awt.Color(255, 153, 0));
            jLabelValores.setForeground(new java.awt.Color(255, 153, 0));
            jLabelPad.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kusterordonio/recursos/TablaPaDNena.png")));
            jLabelPas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kusterordonio/recursos/TablaPaSNena.png"))); 
        }
    }
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabelTitulo = new javax.swing.JLabel();
        jSeparator1 = new javax.swing.JSeparator();
        jLabelPad = new javax.swing.JLabel();
        jLabelValores = new javax.swing.JLabel();
        jLabelPas = new javax.swing.JLabel();
        jBtnSalir = new javax.swing.JButton();
        jLabel3 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Presión arterial");
        setBounds(new java.awt.Rectangle(200, 100, 0, 0));
        setResizable(false);

        jPanel1.setLayout(null);

        jLabelTitulo.setFont(new java.awt.Font("Tahoma", 1, 18));
        jLabelTitulo.setForeground(new java.awt.Color(51, 153, 0));
        jLabelTitulo.setText("Presión arterial");
        jPanel1.add(jLabelTitulo);
        jLabelTitulo.setBounds(20, 20, 160, 20);
        jPanel1.add(jSeparator1);
        jSeparator1.setBounds(0, 50, 630, 2);

        jLabelPad.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelPad.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kusterordonio/recursos/TablaPaD.png"))); // NOI18N
        jLabelPad.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel1.add(jLabelPad);
        jLabelPad.setBounds(320, 105, 266, 339);

        jLabelValores.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabelValores.setForeground(new java.awt.Color(51, 153, 0));
        jLabelValores.setText("Valores de PA correspondientes al percentil 95 para niños, según edad y talla");
        jPanel1.add(jLabelValores);
        jLabelValores.setBounds(40, 60, 540, 30);

        jLabelPas.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelPas.setIcon(new javax.swing.ImageIcon(getClass().getResource("/kusterordonio/recursos/TablaPaS.png"))); // NOI18N
        jLabelPas.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel1.add(jLabelPas);
        jLabelPas.setBounds(40, 105, 266, 339);

        jBtnSalir.setText("Salir");
        jBtnSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jBtnSalirActionPerformed(evt);
            }
        });
        jPanel1.add(jBtnSalir);
        jBtnSalir.setBounds(280, 490, 80, 22);

        jLabel3.setBackground(new java.awt.Color(255, 255, 255));
        jLabel3.setFont(new java.awt.Font("Arial", 0, 11));
        jLabel3.setText("* Datos resumidos de la Academia Americana de Pediatría, Enero 2005");
        jPanel1.add(jLabel3);
        jLabel3.setBounds(40, 450, 340, 14);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 626, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 535, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    private void jBtnSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnSalirActionPerformed
        this.dispose();
    }//GEN-LAST:event_jBtnSalirActionPerformed
 
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jBtnSalir;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabelPad;
    private javax.swing.JLabel jLabelPas;
    private javax.swing.JLabel jLabelTitulo;
    private javax.swing.JLabel jLabelValores;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JSeparator jSeparator1;
    // End of variables declaration//GEN-END:variables
}
